package com.ruoyi.common.pms.dao;

import com.ruoyi.common.pms.entity.YytShop;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 店铺表 Mapper 接口
 * </p>
 *
 * @author huangshun
 * @since 2021-12-16
 */
@Repository
public interface YytShopMapper extends BaseMapper<YytShop> {

    @Select("SELECT * FROM yyt_shop WHERE del_flag = 0 and owner_id IN (SELECT id FROM yyt_member WHERE state = 1 and del_flag = 0 and wechat_id = #{wechatId})")
    List<YytShop> getMyShopAll(@Param("wechatId") String wechatId);
}
